In recent years significant efforts have been made to facilitate the creation of platform independent software. That is, software that can execute on multiple platforms (e.g. different types of computer or operating systems), without requiring the software program to be rewritten or customized to operate on specific platforms. By way of example, the Java programming language is designed to facilitate the creation of Java software objects that are platform independent. However, in certain situations, it is desirable for a particular software object to make use of platform dependent code to provide a particular functionality. One such platform dependent functionality used by software objects is an audio function.
An audio function represents software used to enable the communication of sound between a computer system and a user. For example, in a graphical user interface environment (GUI), a sound may be used to communicate an event such as opening, dragging or closing a window.
There has been a great deal of work on various Java technologies to ensure seamless integration with the underlying platform, architecture or operation system (OS). If a program is truly seamlessly integrated, a person that is executing a Java program on a particular platform should not be able to distinguish a Java program from a native one. Stated slightly differently, the user's experience should be the same whether the application is created using Java code or native code. The most significant aspect of the user's experience is typically the GUI “look and feel”. More specifically, for a particular GUI event, the user expects the same response from the Java program as a native one.
The JAVA Foundation classes (JFC's), including the Swing component set, is one way to ensure seamless integration with the underlying platform. Swing provides many standard GUI components such as buttons, lists, menus, and text areas, and also includes event-handling methods of how a program responds to external events. Having separate data and state models makes the Swing components highly customizable, and enables sharing data between components. Further, Swing offers many features including support for icons, actions, Pluggable Look & Feel (PLAF) technology, assistive technologies, and separate models. Swing's Pluggable Look & Feel architecture gives the user a wide choice of look-and-feel options. In addition to the usual platform-specific looks and feels, the user can also use the Java Look & Feel, add an accessory look and feel, or use a third-party look and feel.
FIG. 1 illustrates a conventional software configuration 100 of objects concerned with look and feel (L&F) issues inside a running Swing application. The conventional software configuration 100 includes a component 102, a UI Manager 104, and a primary L&F 106. These three objects communicate to arrive at an appearance and behavior for the component 102. The component 102 may be any widget whose actions may utilize or lead to an event, i.e. a button which closes a window producing a particular sound.
The UI Manager 104 is a resource that allows communication between all the different parts of the conventional software configuration 100. The L&F being used is generally considered the primary L&F 106. This primary L&F 106 is either the L&F which emulates the underlying L&F or it is the cross-platform Java L&F (JLF). By way of example, a JLF representation of a Metal L&F is the primary L&F 106 for the conventional software configuration 100. The current L&F is the one implemented by the UI Manager 104. Conventionally, the current L&F is the same as the primary L&F.
To facilitate the applicability of Swing, each emulated look and feel, such as the Windows L&F and the Motif L&F, must appear and behave like the native platform. A growing number of important Java platforms rely on audio cues to inform users of interaction and system activities. Unfortunately, there is no mechanism for providing platform dependent audio functionality in the JFC. By way of example, conventional audio events within a L&F are not applicable to Swing.
In view of the foregoing, it should be apparent that a mechanism which allows audio functionality on platform dependent software the JFC would be desirable.